package com.hb.trade.server.project.calibration.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hb.core.pojo.Attachments;
import com.hb.core.pojo.parent.PageResult;
import com.hb.core.pojo.project.calibration.dto.BidWinResultSupplyDTO;
import com.hb.core.pojo.project.calibration.entity.BidWinResultSupply;

import java.math.BigDecimal;
import java.util.List;

/**
 * 中标通知书关联投标人表 服务类
 *
 * @author gaoyf
 * @since 2021-09-28
 */
public interface BidWinResultSupplyService extends IService<BidWinResultSupply> {

    /**
     * 获取指定中标通知书下的供应商中标通知书详情
     *
     * @param successfulNoticeId 中标通知书ID
     * @return
     */
    List<BidWinResultSupply> listSupplies(Long successfulNoticeId);

    /**
     * 更新中标人中标金额
     *
     * @param id
     * @param amount
     * @return
     */
    boolean updateBidPrice(Long id, BigDecimal amount, Attachments attachments);
    /**
     *
     * @Description: 根据中标结果id查询多个中标人
     * @Author: zhongdl
     * @Date:2021/12/20 10:31
     * @param winResultId:
     * @return: {@link List<  BidWinResultSupply > }
     **/
    List<BidWinResultSupplyDTO> listSuccessfulNoticeSupply(Long winResultId);


    /**
     *
     * @Description: 删除中标人公示下的中标人
     * @Author: zhongdl
     * @Date:2021/12/20 10:38
     * @param winResultId:
     * @return: {@link Boolean }
     **/
    Boolean deleteSuccessfulNoticeSupplyByWinResultId(Long winResultId);

    /**
     *
     * @Description: 查询中标结果公示包含的标段信息
     * @Author: zhongdl
     * @Date:2022/1/5 17:09
     * @param successfulNoticeSupply:
     * @return: {@link PageResult<  BidWinResultSupplyDTO > }
     **/
    PageResult<BidWinResultSupplyDTO> pageIncludeBidSection(BidWinResultSupplyDTO successfulNoticeSupply);


    /**
     * 查询当前企业是否中标
     * @author tian
     * @date 2022-3-1 9:21
     * @param sectionId
     * @param orgId
     * @return java.lang.Boolean
     */
    Boolean getWinResultSupplyBySectionId(Long sectionId, Long orgId);

    /**
     * @Description: 根据标段ID查询详情
     *
     * @author yuezheng
     * @param sectionIdList
     * @return java.util.List<com.hb.core.pojo.project.calibration.entity.BidWinResultSupply>
     * @date 2022/6/27 19:17
     */
    List<BidWinResultSupply> selectResultSupplyBySectionIdList(List<Long> sectionIdList);
}
